<%@ page language="java" import="java.util.*,edu.nanyang.domain.City" pageEncoding="utf-8"%>

<%
if(session.getAttribute("userid")==null){
	response.sendRedirect("login.jsp");
}
request.setCharacterEncoding("utf-8");
%>
<%@taglib prefix="s" uri="/struts-tags" %>  
  

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" type="text/css" href="gpfw_layout.css" media="all"/>
<link rel="stylesheet" type="text/css" href="gpfw_color.css" media="all">
<link rel="stylesheet" type="text/css" href="gpfw_font-size_medium.css" media="all"/>
<link rel="stylesheet" type="text/css" href="gpfw_print.css" media="print"/>
<script type="text/javascript" src="gpfw.js"></script>
<script type="text/javascript" src="js/jquery-1.4.4.js" charset="utf-8"></script>
<script type="text/javascript" src="js/My97DatePicker/WdatePicker.js" charset="utf-8"></script>
  </head>
  
  <body> 
     
  <table class="azmainFrame" cellspacing="0" cellpadding="0">
  <tr>
    <td class="azgyom"><table class="azpalette" cellpadding="0" cellspacing="0">
  <tr>
    <td class="azpalette"><table class="aztileLarge" cellspacing="0" cellpadding="0">
  <tr>
    <td><table class="aztabSheetArea" id="ragSUBMIT1" name="ragSUBMIT1" cellpadding="0" cellspacing="0" style="display:inline-table;">
  
  
  <s:form action="release" enctype="multipart/form-data" id="form_huya" method="post">
   <h3>当前城市：<%if(session.getAttribute("city")!=null){
      				out.print( ((City)session.getAttribute("city")).getName());
      			}else{
      				out.print( "南阳");
      			}%></h3><br/>
  <s:fielderror cssStyle="color:red;" />
	  <s:radio list="{'转让','求购'}" name="goods.supplyordemand" key="供需"></s:radio>
	  <s:select list="#{0:'不参与竞拍',1:'参与竞拍'}" id="classify" name="goods.isJingpaiOrNot" key="是否参与竞拍"></s:select>
	  <s:textfield name="goods.title" key="标题"></s:textfield>
	  <s:select list="#{'二手电脑':'二手电脑','二手手机':'二手手机','数码产品':'数码产品','生活用品':'生活用品','小家电':'小家电','文体用品':'文体用品','文具图书':'文具图书','其他':'其他'}" id="classify" name="goods.classify" key="分类"></s:select>
	  <s:select list="#{'全新':'全新','九成新':'九成新','八成新':'八成新','七成新':'七成新','六成新':'六成新','五成新':'五成新','四成新':'四成新','三成新':'三成新'}" id="newlevel" name="goods.newlevel" key="新旧程度"></s:select>
	  <s:textfield  name="goods.price" key="转让价格"></s:textfield>
	  <s:select name="schoolID" list="#{'':'请选择学校'}" key="请选择学校" id="shanming"></s:select>
	  <s:textfield  name="goods.area" key="所在区域"></s:textfield>
	  <s:textarea  name="goods.description" key="物品描述"></s:textarea>
	  <s:textfield  name="goods.telephone" key="手机或电话"></s:textfield>
	  <s:textfield  name="goods.contactname" key="联系人"></s:textfield>
	  <s:textfield  name="goods.qqormsn" key="QQ或MSN"></s:textfield>
	  <s:file name="file" label="上传图片"></s:file>
	  <s:submit value="马上发布" onclick="submit_form();"></s:submit>
  </s:form>
  
  </body>
  <script type="text/javascript">
  	var rootPath='<%=basePath%>';
	$.post(rootPath+"json/getCurSchoolByCurCityId.action",
		{},
		function(data){
			for(var i=0;i<data.list.length;i++){
				$('<option value="'+data.list[i].id+'">'+data.list[i].name+"</option>").appendTo("#shanming");
			}
		},
		"json"
	);
	function submit_form(){
		
			$("#form_huya").submit();
		
	}
  </script>
</html>
